//导包
const dbconfig = require('D:/study/myPHP/vue-admin-template/src/utils/dbconfig.js');

//查询
const sqlFind = 'select * from t2';
dbconfig.sqlConn(sqlFind,[]).then(res =>{
    console.log('res',res);
    });

//插入
const sqlInsert = 'insert into t2(d1,d2,d3,d4) values(?,?,?,?) ';
insertParams=['999','999','999','999']
dbconfig.sqlConn(sqlInsert,insertParams).then(res =>{
    console.log('res',res);
    });